package cn.accp.petShop.entity;

import cn.accp.petShop.baseEntity.PetBase;

/**
 * 狗类继承宠物类
 * 
 * @author Jiangqs
 * 
 */
public class Dog extends PetBase {
	// 毛色
	private String skin;

	public void hunt() {
		System.out.println(this.name + "开始打猎了，狗的编号是" + this.getId());
	}

	public Dog() {
		super(0, null, null, 0);
		System.out.println("Dog类的构造方法运行了！");
	}

	public Dog(int id, String name, String type, int lovely, String skin) {
		super(id, name, type, lovely);
		System.out.println("Dog类的带参构造方法运行了！");
		this.setSkin(skin);
	}

	@Override
	// 标示为重写方法
	public void eat() {
		// TODO Auto-generated method stub
		// super.eat();// super表示父类的引用
		System.out.println(this.name + "正在啃骨头！");
	}

	/**
	 * @return the skin
	 */
	public String getSkin() {
		return skin;
	}

	/**
	 * @param skin
	 *            the skin to set
	 */
	public void setSkin(String skin) {
		this.skin = skin;
	}

	@Override
	public void run() {
		System.out.println(this.name + "正在奔跑！");
	}
}
